<?php

interface IDataAccessObject
{

  /**
   *
   * @return IDataAccessObject
   */
  public function beginTransaction();

  /**
   *
   * @return IDataAccessObject
   */
  public function commit();

  /**
   *
   * @return IDataAccessObject
   */
  public function rollback();

  /**
   *
   * @return IQueryObject
   */
  public function factoryQueryObject();

  /**
   *
   * @return IDataAccessObject
   */
  public function connect();

  /**
   *
   * @return IDataAccessObject
   */
  public function disconnect();

  /**
   *
   * @return mixed
   */
  public function lastInsertId();

  /**
   *
   * @param string $sql
   * @return IQueryObject
   */
  public function query($sql = null);

  /**
   *
   * @param mixed $value
   * @param mixed $type
   * @return mixed
   */
  public function quote($value, $type = null);

}

?>